package com.info.zhiduoduo.repository.entity.pay;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @author tianyonghong
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("zdd_payment")
public class Payment extends Model<Payment> {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 支付方式编码 枚举：{@link com.info.zhiduoduo.common.constants.pay.PayTypeSn}
     */
    @ApiModelProperty("支付方式编码 BTL:线下 ZS:招商银行 ZFBB2C:支付宝 ZFBWTJD:支付宝委托接单 PA:平安银行")
    @TableField("pay_type_sn")
    private String payTypeSn;

    @ApiModelProperty("支付方式编码 BTL:线下 ZS:招商银行 ZFBB2C:支付宝 ZFBWTJD:支付宝委托接单 PA:平安银行")
    @TableField("pay_type_sn_name")
    private String payTypeSnName;

    @ApiModelProperty("来源表 0:空 1:表zdd_payment_merchant 2:表zdd_maker_alipay_principal")
    @TableField("source_table")
    private Integer sourceTable;

    @ApiModelProperty("来源表的ID")
    @TableField("source_id")
    private Integer sourceId;

    @ApiModelProperty("支付名称")
    @TableField("pay_name")
    private String payName;

    @ApiModelProperty("支付方式名称（企业端展示）")
    @TableField("pay_name_alias")
    private String payNameAlias;

    @ApiModelProperty("是否隐藏(0:否 1:是)")
    @TableField("hidden")
    private Integer hidden;

    @ApiModelProperty("创建时间")
    @TableField("created_time")
    private Date createdTime;

    @ApiModelProperty("修改时间")
    @TableField("updated_time")
    private Date updatedTime;

    @ApiModelProperty("支付方式对应主体")
    @TableField("party_id")
    private Integer partyId;

    @Override
    protected Serializable pkVal() {
        return id;
    }

}
